/* 设置页面样式 - 图片视频下载器 */

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 根变量 */
:root {
    --primary-color: #2196F3;
    --primary-dark: #1976D2;
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --error-color: #f44336;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-disabled: #999999;
    --background-primary: #ffffff;
    --background-secondary: #f5f5f5;
    --border-color: #e0e0e0;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* 基础样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--background-secondary);
    min-height: 100vh;
}

/* 设置容器 */
.options-container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--background-primary);
    min-height: 100vh;
    box-shadow: var(--shadow-medium);
}

/* 头部样式 */
.options-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-light);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
}

.header-info h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.header-info p {
    font-size: 14px;
    opacity: 0.9;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* 按钮样式 */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 内容区域 */
.options-content {
    display: flex;
    min-height: calc(100vh - 88px);
}

/* 侧边栏 */
.sidebar {
    width: 250px;
    background: var(--background-secondary);
    border-right: 1px solid var(--border-color);
    padding: 20px 0;
}

.nav-menu {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(33, 150, 243, 0.1);
    color: var(--primary-color);
}

.nav-item.active {
    background: rgba(33, 150, 243, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* 设置区域 */
.settings-section {
    display: none;
}

.settings-section.active {
    display: block;
}

.settings-section h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--text-primary);
}

/* 设置组 */
.setting-group {
    margin-bottom: 40px;
}

.setting-group h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

/* 设置项 */
.setting-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-label {
    flex: 1;
    max-width: 400px;
}

.setting-label label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.setting-description {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.setting-control {
    flex: 1;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 表单控件 */
.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* 开关样式 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--text-disabled);
    transition: var(--transition);
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
}

.toggle-switch input:checked+.toggle-slider {
    background-color: var(--primary-color);
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(26px);
}

/* 格式标签 */
.format-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.format-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
}

.format-tag:hover {
    background: rgba(33, 150, 243, 0.1);
    border-color: var(--primary-color);
}

.format-tag input[type="checkbox"] {
    display: none;
}

.format-tag input[type="checkbox"]:checked+span {
    color: var(--primary-color);
    font-weight: 500;
}

.format-tag input[type="checkbox"]:checked~.format-tag {
    background: rgba(33, 150, 243, 0.1);
    border-color: var(--primary-color);
}

/* 按钮组 */
.button-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.button-group .btn-secondary {
    background: var(--background-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    font-size: 13px;
}

.button-group .btn-secondary:hover {
    background: var(--border-color);
}

/* 存储信息 */
.storage-info {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.storage-bar {
    flex: 1;
    height: 8px;
    background: var(--background-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.storage-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.storage-text {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 80px;
    text-align: right;
}

/* 单位标签 */
.unit {
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: 8px;
}

/* 关于页面 */
.about-content {
    max-width: 600px;
}

.about-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--background-secondary);
    border-radius: var(--border-radius);
}

.about-icon {
    width: 80px;
    height: 80px;
    border-radius: 12px;
}

.about-info h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.about-info .version {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.about-info .description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.about-features {
    margin-bottom: 30px;
}

.about-features h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.about-features ul {
    list-style: none;
    padding-left: 0;
}

.about-features li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.about-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.about-links {
    margin-bottom: 30px;
}

.about-links h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.link-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 14px;
}

.link-item:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.link-item svg {
    width: 16px;
    height: 16px;
}

.about-license {
    padding: 20px;
    background: var(--background-secondary);
    border-radius: var(--border-radius);
}

.about-license h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.about-license p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .options-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu {
        flex-direction: row;
        overflow-x: auto;
        padding: 0 20px;
    }

    .nav-item {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .nav-item.active {
        border-left: none;
        border-bottom-color: var(--primary-color);
    }

    .main-content {
        padding: 20px;
    }

    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .setting-control {
        max-width: 100%;
    }

    .options-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .options-header {
        padding: 16px 20px;
    }

    .main-content {
        padding: 16px;
    }

    .settings-section h2 {
        font-size: 24px;
    }

    .setting-group h3 {
        font-size: 16px;
    }

    .about-header {
        flex-direction: column;
        text-align: center;
    }

    .link-group {
        flex-direction: column;
    }

    .link-item {
        justify-content: center;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.settings-section.active {
    animation: fadeIn 0.3s ease;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}